package com.qiuyuliantu.system.service.impl;

import java.util.List;
import com.qiuyuliantu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qiuyuliantu.system.mapper.SysUserMailMapper;
import com.qiuyuliantu.common.core.domain.entity.SysUserMail;
import com.qiuyuliantu.system.service.ISysUserMailService;

/**
 * 邮件服务Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-20
 */
@Service
public class SysUserMailServiceImpl implements ISysUserMailService
{
    @Autowired
    private SysUserMailMapper sysUserMailMapper;

    /**
     * 查询邮件服务
     *
     * @param id 邮件服务主键
     * @return 邮件服务
     */
    @Override
    public SysUserMail selectSysUserMailById(Long id)
    {
        return sysUserMailMapper.selectSysUserMailById(id);
    }

    /**
     * 查询邮件服务列表
     *
     * @param sysUserMail 邮件服务
     * @return 邮件服务
     */
    @Override
    public List<SysUserMail> selectSysUsermailist(SysUserMail sysUserMail)
    {
        return sysUserMailMapper.selectSysUsermailist(sysUserMail);
    }

    /**
     * 新增邮件服务
     *
     * @param sysUserMail 邮件服务
     * @return 结果
     */
    @Override
    public int insertSysUserMail(SysUserMail sysUserMail)
    {
        sysUserMail.setCreateTime(DateUtils.getNowDate());
        return sysUserMailMapper.insertSysUserMail(sysUserMail);
    }

    /**
     * 修改邮件服务
     *
     * @param sysUserMail 邮件服务
     * @return 结果
     */
    @Override
    public int updateSysUserMail(SysUserMail sysUserMail)
    {
        sysUserMail.setUpdateTime(DateUtils.getNowDate());
        return sysUserMailMapper.updateSysUserMail(sysUserMail);
    }

    /**
     * 批量删除邮件服务
     *
     * @param ids 需要删除的邮件服务主键
     * @return 结果
     */
    @Override
    public int deleteSysUserMailByIds(Long[] ids)
    {
        return sysUserMailMapper.deleteSysUserMailByIds(ids);
    }

    /**
     * 删除邮件服务信息
     *
     * @param id 邮件服务主键
     * @return 结果
     */
    @Override
    public int deleteSysUserMailById(Long id)
    {
        return sysUserMailMapper.deleteSysUserMailById(id);
    }
}
